$def with (code, lang=None)

$if lang:
    $ lang = "lang-" + lang

$def splitlines(text):
    $ text = text.rstrip()
    $ n = text.count("\n") + 1
    <table class="code">
    <tbody>
    <tr>
    <td>
    <pre>\
    $# detect-missing-i18n-skip-line
    $for i in range(n): <span rel="#L$(i+1)">$("%4d" % (i+1))</span>
    </pre>
    </td>
    <td style="width:100%;"><pre>$text</pre></td>
    </tr>
    </tbody>
    </table>

<div class="contenttext">
<div class="red" style="background-color: white; padding: 20px;">$_("Templates in the website are disabled now. Editing them will not have any effect on the live website.")</div>

$:splitlines(code)
</div>
